(goto-address-at-point): Deal with URLs
authorGerd Moellmann <gerd@gnu.org>
Fri, 18 May 2001 12:47:43 +0000 (12:47 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 18 May 2001 12:47:43 +0000 (12:47 +0000)
part of which look like email addresses.

lisp/net/goto-addr.el

index 986489bdd62c43017aaeb4a6fc7ffdae4c6eee1a..bb75508935ff7305aef487503f9d5e0a37c2a3fb 100644 (file)
@@ -201,7 +201,12 @@ there, then load the URL at or before point."
   (interactive)
   (save-excursion
     (let ((address (save-excursion (goto-address-find-address-at-point))))
-      (if address
+      (if (and address 
+              (save-excursion
+                (goto-char (previous-single-char-property-change
+                            (point) 'goto-address nil
+                            (line-beginning-position)))
+                (not (looking-at goto-address-url-regexp))))
          (compose-mail address)
        (let ((url (browse-url-url-at-point)))
          (if url